package com.ms.p2p.provider.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.ms.p2p.bean.PageBean;
import com.ms.p2p.entity.system.AdminUser;
import com.ms.p2p.provider.AdminUserProvider;
import com.ms.p2p.service.impl.AdminUserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * Created by daimajia on 2015/4/19 添加dubbo接口.
 */
@Service
public class AdminUserProviderImpl implements AdminUserProvider {
    @Autowired
    AdminUserServiceImpl adminUserServiceImpl;

    public AdminUser findById(String id) {
        return adminUserServiceImpl.findById(id);
    }

    public int insert(AdminUser adminUser) {
        return adminUserServiceImpl.insert(adminUser);
    }

    public int update(AdminUser map) {
        return adminUserServiceImpl.update(map);
    }

    public AdminUser selectByadmin_name(String admin_name) {
        return adminUserServiceImpl.selectByadmin_name(admin_name);
    }

    public int delete(int id) {
        return adminUserServiceImpl.delete(id);
    }

    public List<AdminUser> findPager(String admin_name, String empId, PageBean page) {
        return adminUserServiceImpl.findPager(admin_name,empId,page);
    }

    public int findCount(String userName, String empId) {
        return adminUserServiceImpl.findCount(userName,empId);
    }

    public List<AdminUser> findByDepart(int i) {
        return adminUserServiceImpl.findByDepart(i);
    }

    public int updateEmp(String user_id, String depart, String passowrld, String name, String admin_name) {
        return adminUserServiceImpl.updateEmp(user_id,depart,passowrld,name,admin_name);
    }
}
